#include "LearnAlgorithm.h"
#include <iostream>

using namespace std;

void showAlgorithmDemoMenu()
{
	cout << "**********************************************************" << endl;
	cout << "Algorithm（算法） 学习案例菜单:" << endl;
	cout << "输入对应选项索引号并回车进入：" << endl;
	cout << "  1. 案例一：广度优先遍历（BFS）算法演示" << endl;
	cout << "  2. 案例二：深度优先遍历（）算法演示" << endl;
	cout << "  3. 案例三：A星（A Star 或 A*）算法演示" << endl;
	cout << "  Q. 退出；" << endl;
	cout << "**********************************************************" << endl;
	cout << "请输入:" << endl;
}

void gotoAlgorithmDemoMenu()
{
    char commond;
	while (showAlgorithmDemoMenu(), cin >> commond, 'q' != tolower(commond)) {
		switch (tolower(commond)) {
		case '1':
			breadthFirstSearchDemo();
			break;
		case '2':
			aStarAlgorithmDemo();
			break;
		case '3':
			aStarAlgorithmDemo();
			break;
		}
	}
}